<?php

include "connect.php";
$reg_no=$_POST['reg_no'];
$password=$_POST['password'];
$type=$_POST['type'];

$sq=mysql_query("select * From student_login where reg_no='$reg_no'");
while ($row = mysql_fetch_array($sq)) {
$sql=mysql_query("UPDATE student_login SET reg_no='$reg_no',password='$password',type='$type'
  where reg_no='$reg_no'");


header("location:update student login.php");
}
?>